﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Windows.Forms;
using ModularAndPlugin.WinApp.Composition;
using ModularAndPlugin.WinApp.Contracts;
using System.ComponentModel.Composition;

namespace UI.WinForm.Clients
{
    [MenuAttibute("Clients")]
    public class ClientsMenu : IMenu
    {
        private ToolStripMenuItem ClientsMainMenu;
        private ToolStripMenuItem ClientsConsultarMenu;
        private ToolStripMenuItem ClientsNovoMenu;
        private ToolStripMenuItem ClientsProducts;
        private ToolStripMenuItem CreateMenu()
        {
            this.ClientsMainMenu = new System.Windows.Forms.ToolStripMenuItem();
            this.ClientsConsultarMenu = new System.Windows.Forms.ToolStripMenuItem();
            this.ClientsNovoMenu = new System.Windows.Forms.ToolStripMenuItem();
            ClientsProducts = new System.Windows.Forms.ToolStripMenuItem();
            // 
            // MenuClientsMain
            // 
            this.ClientsMainMenu.DropDownItems.AddRange(
                new System.Windows.Forms.ToolStripItem[] {
                    this.ClientsConsultarMenu,ClientsProducts,
                    this.ClientsNovoMenu});
            this.ClientsMainMenu.Name = "MenuClientsMain";
            this.ClientsMainMenu.Text = "客户端";
            // 
            // MenuClientsConsultar
            // 
            this.ClientsConsultarMenu.Name = "MenuClientsList";
            this.ClientsConsultarMenu.Text = "列表";
            this.ClientsConsultarMenu.Click += new EventHandler(ClientsCommandFacade.MenuClientList);
            // 
            // MenuClientsNovo
            // 
            this.ClientsNovoMenu.Name = "MenuClientsAdd";
            this.ClientsNovoMenu.Text = "增加";
            this.ClientsNovoMenu.Click += new EventHandler(ClientsCommandFacade.MenuAddClient);

            //// 
            //// MenuClientsNovo
            //// 
            this.ClientsProducts.Name = "ClientsProducts";
            this.ClientsProducts.Text = "客户端数据";
            this.ClientsProducts.Click += new EventHandler(ClientsCommandFacade.ClientsProducts);

            return ClientsMainMenu;
        }

        [ImportingConstructor()]
        public ClientsMenu([Import(typeof(IModuleHandler))] IModuleHandler moduleHandler_)
        {
            CreateMenu();
            ClientsCommandFacade.ModuleHandler = moduleHandler_;
        }

        public ToolStripMenuItem WinFormsMenu
        {
            get { return ClientsMainMenu; }
        }
    }
}
